package com.tanger.im.entity;

import com.tanger.common.jpa.IDEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description IM用户地址实体类
 * @Author Hchenbin
 * @Date 2023/12/25 16:28
 * @Version 1.0
 */
@Data
@Entity
@NoArgsConstructor
@Api(value = "IMUserAddress", tags= "IM用户地址实体类")
@Table(name = "im_user_address")
public class ImUserAddress extends IDEntity implements Serializable {

	@Column(columnDefinition = "bigint(20) NOT NULL COMMENT 'IM用户ID'")
	@ApiModelProperty(value = "IM用户ID")
	private Long userId;
	@Column(columnDefinition = "varchar(100) NOT NULL COMMENT '省'")
	@ApiModelProperty(value = "省")
	private String province;
	@Column(columnDefinition = "varchar(100) DEFAULT NULL COMMENT '市'")
	@ApiModelProperty(value = "市")
	private String city;
	@Column(columnDefinition = "varchar(100) DEFAULT NULL COMMENT '区(县)'")
	@ApiModelProperty(value = "区(县)")
	private String region;
	@Column(columnDefinition = "varchar(255) DEFAULT NULL COMMENT '详细地址'")
	@ApiModelProperty(value = "详细地址")
	private String detailAddr;

	public ImUserAddress(Long userId) {
		this.userId = userId;
	}
}
